{NeoBook Function}
Version=5,80
Language=VBScript
Comment=Sending e-mail in txt or html modes. The default encoding for Cyrillic is utf-8, the sending mode is html. You can change the encoding or sending mode by editing the function.
Param=[%From]|Text|Sender's E-mai:
Param=[%To]|Text|Recipient's E-mail:
Param=[%Subject]|Text|Subject:
Param=[%Msg]|Text|Text:
Param=[%Server]|Text|SMTP Server:
Param=[%User]|Text|User Name/Account:
Param=[%Password]|Text|Password:
Param=[%Port]|Number|Port:
Param=[%File]|FileName|Attached file
{End}
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "[%Subject]"
objMessage.From = "[%From]"
objMessage.To = "[%To]"
objMessage.BodyPart.CharSet = "utf-8"
'objMessage.TextBody = "[%Msg]"
objMessage.HTMLBody = "[%Msg]"
objMessage.AddAttachment "[%File]"

'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "[%Server]"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = [%Port]

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[%User]"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "[%Password]"


objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==
objMessage.Send
